package com.base.api.controller.ptgoldbean;

import com.base.result.ResponseResult;
import com.base.result.ResponseResultUtils;
import com.base.self.service.IPtgoldbeanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "金豆相关接口")
@RequestMapping("/api/ptgoldbean")
public class PtgoldbeanController {
    @Autowired
    private IPtgoldbeanService ptgoldbeanService;

    @PostMapping
    @ApiOperation("查看用户的金豆数量")
    public ResponseResult userGoldbeans(@RequestParam String userId){
        return ResponseResultUtils.getResponseResultS("查询成功",ptgoldbeanService.userGoldbeans(userId));
    }

}
